import axios from "@/api/http";


const login = (params: any = {}) => {
    return axios.post('/user/login', params)
}
const register = (params: any = {}) => {
    return axios.post('/user/register', params)
}


const emailLogin = (params: any = {}) => {
    return axios.post('/user/emailLogin', params)
}


const forget = (params: any = {}) => {
    return axios.post('/user/forget', params)
}


const userinfo = (params: any = {}) => {
    return axios.post('/user/userinfoByToken', params)
}
const updateUserInfo = (params: any = {}) => {
    return axios.post('/user/updateUserInfo', params)
}

const list = (params: any = {}) => {
    return axios.post('/user/list', params)
}
const logout = (params: any = {}) => {
    return axios.post('/user/logout', params)
}
export default {
    login,
    register,
    emailLogin,
    forget,

    userinfo,
    updateUserInfo,
    list,
    logout
}